import 'package:flutter_test/flutter_test.dart';
import 'package:flutterrockui/flutterrockui.dart';
import 'package:flutterrockui/flutterrockui_platform_interface.dart';
import 'package:flutterrockui/flutterrockui_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockFlutterrockuiPlatform
    with MockPlatformInterfaceMixin
    implements FlutterrockuiPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final FlutterrockuiPlatform initialPlatform = FlutterrockuiPlatform.instance;

  test('$MethodChannelFlutterrockui is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelFlutterrockui>());
  });

  test('getPlatformVersion', () async {
    Flutterrockui flutterrockuiPlugin = Flutterrockui();
    MockFlutterrockuiPlatform fakePlatform = MockFlutterrockuiPlatform();
    FlutterrockuiPlatform.instance = fakePlatform;

    expect(await flutterrockuiPlugin.getPlatformVersion(), '42');
  });
}
